package com.admin.dbdao;

import com.admin.bean.Tag;
import com.data.dbdao.BaseDao;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class TagAdminDao extends BaseDao {
    public List<Tag> listTagDao() {
        String hql = "from Tag ";
        return (List<Tag>) super.findMassageDao(hql);
    }

    public boolean deleteTagDao(String id) {
        String sql = "delete from tag where id=?";
        return super.updateMysqlMethodDao(sql, id) > 0;
    }
}
